﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sispe.Repository.Mapping;
using System.Data.Entity.Infrastructure;

//using System.Data.Entity.Infrastructure;
using System.Data.Objects;
using System.Data;

using Sispe.Entities;


namespace Sispe.Repository
{
    public abstract class MasterRepository
    {
        public SISPEContext context { get; set; }

        public MasterRepository()
        {
            context = new SISPEContext();
        }

        //public MasterRepository()
        //{
        //    if (_context == null)
        //    {
        //        _context = new SISPEContext();
        //        _objectContext = ((IObjectContextAdapter)_context).ObjectContext;
        //        //_transaction = ((IObjectContextAdapter)context).ObjectContext.Connection.BeginTransaction();
        //    }
        //}

        //private SISPEContext _context;
        //protected SISPEContext context
        //{
        //    get { return _context; }
        //}

        //private ObjectContext _objectContext;
        //protected ObjectContext ObjectContext
        //{
        //    get { return _objectContext; }
        //}

        

        
    }
}
